package com.gomoku.backend.controller.record;

import com.alibaba.fastjson2.JSONObject;
import com.gomoku.backend.mapper.RecordMapper;
import com.gomoku.backend.service.record.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RecordController {

    @Autowired
    RecordService recordService;

    @RequestMapping("/record/getlist/")
    public JSONObject getRecords(@RequestParam Map<String,String>data){
        Integer page = Integer.valueOf(data.get("page"));
        return recordService.getRecords(page);
    }
}
